@import "~scss/variables";

.sw-entity-advanced-selection-modal {
    .sw-modal__body {
        padding: 0;
    }

    .mt-card.sw-entity-advanced-selection-modal__content {
        width: 100%;
        height: 100%;
        margin: 0;
        border: 0;
        border-radius: 0;

        .sw-card-filter {
            width: 100%;
        }

        .mt-card {
            &__toolbar {
                padding-bottom: 20px;
            }

            &__content {
                border: 1px solid var(--color-border-primary-default);
                padding: 0;
            }
        }
    }

    .sw-entity-advanced-selection-modal__filter-list-button {
        position: relative;
    }

    .sw-context-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        z-index: 9000;
        min-width: 380px;

        &__content::before {
            display: none;
        }
    }

    .sw-entity-advanced-selection-modal__filter-badge {
        position: absolute;
        top: 0;
        right: 0;
        transform: translate(50%, -50%);
        color: $color-white;
        background-color: $color-shopware-brand-500;
        font-size: $font-size-xxs;
        font-style: normal;
        font-weight: $font-weight-regular;
        padding: 0;
        margin: 0;
        width: 16px;
        height: 16px;
        border-radius: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .sw-modal__dialog {
        max-height: 80vh;
    }

    .mt-card .mt-card__content {
        // fixed height for card / modal content
        // 80vh is modal max-height, subtract size of modal header + footer + card header
        height: calc(80vh - 64px - 72px - 93px);
    }

    .sw-entity-advanced-selection-modal__filter-panel {
        // maximum height for flyout scrollable area - flyout should be roughly the same as the grid height
        // 80vh is modal max-height, subtract size of modal header + footer + card header + grid pagination
        // + filter headline + filter footer + border of flyover
        max-height: calc(80vh - 64px - 72px - 93px - 64px - 53px - 58px - 2px);
        overflow-y: auto;
    }

    .sw-context-menu__content {
        padding: 0;
    }

    .sw-entity-advanced-selection-modal__filter-headline {
        padding: 16px 24px;
        margin: 0;
        font-size: $font-size-s;
        font-weight: $font-weight-bold;
        border-bottom: 1px solid $color-gray-300;
    }

    .sw-entity-advanced-selection-modal__filter-footer {
        background-color: $color-gray-100;
        padding: 20px 24px;
        text-align: right;
    }

    .sw-entity-advanced-selection-modal__filter-reset {
        font-weight: $font-weight-semi-bold;
        font-size: $font-size-xs;
    }

    .sw-data-grid__actions-menu {
        // hide any row action context menus. Only the settings context menu at the top right should be visible
        display: none;
    }
}
